﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="../scripts/boot.js" type="text/javascript"></script>
    <script type="text/javascript">
        $.ajax({
            url: "../data/system.aspx?method=707",
            async: false,
            success: function (text) {
                if (text == "no")
                    window.location = "../system/error.html";
                else if (text == "out") {
                    var loginWindow = parent.mini.get("loginWindow");
                    if (!loginWindow.visible)
                        loginWindow.show();
                    var tabs = parent.mini.get("mainTabs");
                    var tab = tabs.getTab("tab$707");
                    tabs.removeTab(tab);
                }
            }
        });

        var Edu = [{ id: '博士', text: '博士' }, { id: '硕士', text: '硕士' }, { id: '本科', text: '本科' }, { id: '专科', text: '专科' }, { id: '其他', text: '其他' }, { id: '0', text: '全部'}];
        var Hard = [{ id: 0, text: '不属于困难毕业生' }, { id: 1, text: '城乡低保' }, { id: 2, text: '低保边缘户' }, { id: 3, text: '城镇零就业家庭' }, { id: 4, text: '父母亲患重大疾病造成家庭经济特别困难' }, { id: 5, text: '烈士子女' }, { id: 6, text: '家庭遭遇重大变故造成家庭经济特别困难' }, { id: 7, text: '孤儿' }, { id: 8, text: '残疾毕业生' }, { id: 9, text: '其他' }, { id: -1, text: '全部'}];
        var Will1 = [{ id: '不限', text: '不限' }, { id: '本市', text: '本市' }, { id: '本省', text: '本省' }, { id: '其他地区', text: '其他地区' }, { id: '0', text: '全部'}];
        var Will2 = [{ id: '自愿暂时不就业', text: '自愿暂时不就业' }, { id: '不限', text: '不限' }, { id: '非国有企业', text: '非国有企业' }, { id: '公益性岗位安置', text: '公益性岗位安置' }, { id: '自主创业', text: '自主创业' }, { id: '灵活就业', text: '灵活就业' }, { id: '其他', text: '其他' }, { id: '0', text: '全部'}];
        var Need = [{ id: 1, text: '政策咨询' }, { id: 2, text: '就业指导' }, { id: 3, text: '就业见习' }, { id: 4, text: '推荐就业' }, { id: 5, text: '职业培训' }, { id: 6, text: '创业服务' }, { id: 7, text: '小额贷款' }, { id: 8, text: '其他' }, { id: 0, text: "全部"}];
        var Goto = [{ id: 1, text: '党政机关' }, { id: 2, text: '事业单位' }, { id: 3, text: '国有企业' }, { id: 4, text: '非国有企业' }, { id: 5, text: '自主创业' }, { id: 6, text: '社区岗位' }, { id: 7, text: '基层项目' }, { id: 8, text: '科研助理' }, { id: 9, text: '灵活就业' }, { id: 10, text: '部队' }, { id: 11, text: '就业见习' }, { id: 12, text: '职业培训' }, { id: 13, text: '升学出国' }, { id: 14, text: '自愿暂时不就业' }, { id: 15, text: '其他' }, { id: 0, text: '全部'}];
    </script>
</head>
<body>
    <div class="mini-toolbar" style="border-bottom:0;">
        <table>
            <tr>
                <td>
                困难状况：
                <input id="hard" class="mini-combobox" data="Hard" value="-1" style="width:250px"/>
                就业地意向：
                <input id="will1" class="mini-combobox" data="Will1" value="0" style="width:80px"/>
                就业类型：
                <input id="will2" class="mini-combobox" data="Will2" value="0" style="width:110px"/>
                就业服务需求：
                <input id="need" class="mini-combobox" data="Need" value="0" style="width:80px"/>
<!--                就业去向：
                <input id="goto" class="mini-combobox" data="Goto" value="0" style="width:110px"/>-->
                </td>
            </tr>
            <tr>
                <td>
                毕业日期：
                <input id="sdate" class="mini-datepicker" style="width:115px"/>
                至
                <input id="edate" class="mini-datepicker" style="width:115px"/>
                学历：
                <input id="edu" class="mini-combobox" data="Edu" value="0" style="width:70px"/>
                <a class="mini-button" iconcls="icon-search" plain="true" onclick="search();">查询</a>
                <span class="separator"></span>
                <a class="mini-button" plain="true" iconcls="icon-excel" onclick="excelRow()">查询结果导出</a>
                </td>
            </tr>
        </table>
    </div>
    <div class="mini-fit">
        <div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;" allowresize="true" url="../data/system.aspx?method=SStudent" idField="id" sizeList="[15,20,50,100]" pageSize="15">
            <div property="columns">
                <div type="indexcolumn"></div>
                <div field="st_name" width="80" headerAlign="center" align="center" allowSort="true">姓名</div>
                <div field="st_sex" width="40" headerAlign="center" align="center" allowSort="true" renderer="onSexRenderer">性别</div>
                <div field="st_nation" width="60" align="center" headerAlign="center" allowSort="true">民族</div>
                <div field="st_card" width="150" align="center" headerAlign="center" allowSort="true">身份证号</div>
                <div field="st_school" width="80" align="center" headerAlign="center" allowSort="true">毕业院校</div>
                <div field="st_finishtime" width="80" allowSort="true" align="center" headerAlign="center" dateFormat="yyyy-MM-dd">毕业时间</div>
                <div field="st_education" width="60" allowSort="true" align="center" headerAlign="center">学历</div>
                <div field="st_profession" width="100" headerAlign="center" align="center" allowSort="true">所学专业</div>
                <div field="st_hard" width="100" headerAlign="center" align="center" allowSort="true" renderer="onHardRenderer">困难状况</div>
                <div field="st_willarea" width="100" headerAlign="center" align="center" allowSort="true">就业地意向</div>
                <div field="st_willkind" width="120" headerAlign="center" align="center" allowSort="true">就业意向</div>
                <div field="st_need" width="100" headerAlign="center" align="center" allowSort="true" renderer="onNeedRenderer">就业服务需求</div>
                <div field="st_gotocompany" width="110" headerAlign="center" align="center" allowSort="true">就业去向</div>
                <div field="st_yyhk" width="100" headerAlign="center" align="center" allowSort="true">入学前户口所在地</div>
                <div field="st_email" width="80" headerAlign="center" align="center" allowSort="true">电子邮箱</div>
                <div field="st_postcode" width="80" headerAlign="center" align="center" allowSort="true">邮编</div>
                <div field="st_tel" width="80" headerAlign="center" align="center" allowSort="true">联系电话</div>
                <div field="st_inserttime" width="80" headerAlign="center" align="center" allowSort="true" dateFormat="yyyy-MM-dd">提交时间</div>
            </div>
        </div>
    </div>
    <iframe id="exportIFrame" style="display:none;"></iframe>
    <!--导出Excel相关HTML-->
     <form id="excelForm" action="../data/download.aspx?method=ExcelStudent" method="post" target="excelIFrame">
        <input type="hidden" name="hard" id="Hidden1" />
        <input type="hidden" name="will1" id="Hidden2" />
        <input type="hidden" name="will2" id="Hidden3" />
        <input type="hidden" name="need" id="Hidden4" />
        <input type="hidden" name="goto" id="Hidden5" />
        <input type="hidden" name="sdate" id="Hidden6" />
        <input type="hidden" name="edate" id="Hidden7" />
        <input type="hidden" name="edu" id="Hidden8" />
    </form>
    <iframe id="excelIFrame" name="excelIFrame" style="display:none;"></iframe>
</body>
    <script type="text/javascript">
        $.ajaxSetup({
            contentType: "application/x-www-form-urlencoded;charset=utf-8",
            complete: function (XMLHttpRequest, textStatus) {
                if (XMLHttpRequest.responseText == "out") {
                    var loginWindow = parent.mini.get("loginWindow");
                    if (!loginWindow.visible)
                        loginWindow.show();
                }
            }
        });

        mini.parse();

        var myDate = new Date();
        var year = myDate.getFullYear();
//        mini.get("sdate").setValue((myDate.getFullYear() - 1) + "/" + (myDate.getMonth() + 1) + "/1");
//        mini.get("edate").setValue(myDate.getFullYear() + "/" + (myDate.getMonth() + 1) + "/1");
        var grid = mini.get("datagrid1");
        search();

        function search() {
            var edu = mini.get("edu").getValue();
            var hard = mini.get("hard").getValue();
            var will1 = mini.get("will1").getValue();
            var will2 = mini.get("will2").getValue();
            var need = mini.get("need").getValue();
//            var goto = mini.get("goto").getValue();
            var sdate = mini.get("sdate").getText();
            var edate = mini.get("edate").getText();

            $("#Hidden1").val(hard);
            $("#Hidden2").val(will1);
            $("#Hidden3").val(will2);
            $("#Hidden4").val(need);
//            $("#Hidden5").val(goto);
            $("#Hidden6").val(sdate);
            $("#Hidden7").val(edate);
            $("#Hidden8").val(edu);

            //grid.load({ edu: edu, hard: hard, will1: will1, will2: will2, need: need, goto: goto, sdate: sdate, edate: edate });
            grid.load({ edu: edu, hard: hard, will1: will1, will2: will2, need: need, sdate: sdate, edate: edate });
            grid.sortBy("st_no", "desc");
        }

        function onSexRenderer(e) {
            if (e.value == 0)
                return "男";
            else
                return "女";
        }

        function onEduRenderer(e) {
            for (var i = 0; i < Edu.length; i++) {
                var t = Edu[i];
                if (t.id == e.value)
                    return t.text;
            }
            return "";
        }

        function onHardRenderer(e) {
            for (var i = 0; i < Hard.length; i++) {
                var t = Hard[i];
                if (t.id == e.value)
                    return t.text;
            }
            return "";
        }

        function onWill1Renderer(e) {
            for (var i = 0; i < Will1.length; i++) {
                var t = Will1[i];
                if (t.id == e.value)
                    return t.text;
            }
            return "";
        }

        function onWill2Renderer(e) {
            for (var i = 0; i < Will2.length; i++) {
                var t = Will2[i];
                if (t.id == e.value)
                    return t.text;
            }
            return "";
        }

        function onNeedRenderer(e) {
            for (var i = 0; i < Need.length; i++) {
                var t = Need[i];
                if (t.id == e.value)
                    return t.text;
            }
            return "";
        }

        function onGotoRenderer(e) {
            for (var i = 0; i < Goto.length; i++) {
                var t = Goto[i];
                if (t.id == e.value)
                    return t.text;
            }
            return "";
        }

        function excelRow() {
            mini.confirm("确定导出此求职人才统计情况吗？", "系统提示",
                function (action) {
                    if (action == "ok") {
                        $("#excelForm").submit();
                    }
                }
            );
        }
 </script>
</html>
